package com.cloud.prac.controller;

import com.cloud.prac.model.InjectResponse;
import com.cloud.prac.service.inject.TestInjectService;
import com.prac.common.result.DataResult;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 依赖注入方式
 *
 * @author 24373
 * @version 1.0
 * @date 2024-07-14 18:53
 */
@RestController
@RequestMapping("/inject")
public class InjectController {

    @Resource
    private TestInjectService testInjectService;

    @GetMapping("test")
    public DataResult<InjectResponse> test() {
        return new DataResult<>(testInjectService.inject());
    }


}
